package com.eco.db.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.eco.db.dto.FishStatisticsDTO;
import com.eco.db.dto.RecordDto;
import com.eco.db.dto.TimeRangeDTO;
import com.eco.db.entity.Record;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eco.db.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xulinyu
 * @since 2024-07-18
 */
@Mapper
public interface RecordMapper extends BaseMapper<Record> {

    List<FishStatisticsVO> categoryStatistics(TimeRangeDTO timeRangeDTO);

    List<FishStatisticsVO> numberStatistics(@Param(Constants.WRAPPER) QueryWrapper<Record> wrapper,@Param("beginDate")String beginDate,@Param("endDate")String endDate);

    List<SummaryStatisticsVO> summaryStatistics();

    List<FishPassVO> passStatistics();

    List<FishPassTrendVO> passTrendStatistics(@Param("beginDate") String beginDate,@Param("endDate") String endDate);

    List<FishPassSizeTrendVO> passSizeStatistics(@Param("beginDate")String beginDate, @Param("endDate")String endDate, @Param("fishCategoryName")String fishCategoryName);

    IPage<Record> page(IPage<Record> page, @Param("record")RecordDto recordDto);
}
